/*
  路由模块
*/
import Vue from "vue";
import VueRouter from "vue-router";
// 引入路由组件文件夹下的组件
// import Home from "../pages/Home/Home.vue";
import Screen from "../pages/Screen/Screen.vue";
import ScreenProject from "../pages/ScreenProject/ScreenProject.vue";

// 全局注册Vue-router组件
Vue.use(VueRouter);

// 配置路由表并导出
export default new VueRouter({
  //  去掉地址中的哈希#
  // mode: "history",
  routes: [
    {
      path: "/",
      redirect: "/screen"
    },
    // {
    //   path: "/home",
    //   component: Home
    // },
    {
      path: "/screenProject",
      component: ScreenProject
    },
    {
      path: "/screen",
      component: Screen,
      meta: {
        keepAlive: true // 需要被缓存
      }
    }
    // {
    //   path: "/data",
    //   component: Data
    // }
  ]
});
